import { createApp } from 'vue'
import App from './App.vue'
import { router } from './router'
import { store } from './store'
import { element } from './main_conf'
import './assets/style/toot.scss'
import './assets/style/element.scss'

const app = createApp(App)

app.use(router).use(store)

element.forEach(component => {
    app.component(component.name, component)
})

router.beforeEach((to, from, next) => {
    if(typeof to.meta.title === 'string') document.title = to.meta.title
    next()
})

app.mount('#app')
